import type { AxiosRequestConfig, AxiosResponse, InternalAxiosRequestConfig } from "axios";

interface FYInterceptors<T> {
    requestSuccessFn?(config: InternalAxiosRequestConfig): InternalAxiosRequestConfig,
    requestFailFn?(err: any): any,
    responseSuccessFn?(res: T): T,
    responseFailFn?(err: any): any,
}


export interface FYRequestConfig<T = AxiosResponse> extends AxiosRequestConfig {
    interceptors?: FYInterceptors<T>
}